/*
 * @Date: 2023-08-02 10:48:13
 * @LastEditors: bb_c_e_f 961166897@qq.com
 * @LastEditTime: 2023-08-25 21:34:41
 * @FilePath: \part-cloud-appd:\wgwl\veteran_cadre_app\src\api\app\index.ts
 */
import { get, post } from '@/api/index'
import { jsonToUrlParam } from '@/util/utils'

export async function appLogin(data) {
  const res = await post<Api.BasicInstance>('/app/baseCadre/login', data, { notLoading: true })
  return res
}
export async function getInfo() {
  const res = await get<Api.BasicInstance>('/app/baseCadre/getLoginInfo', { notLoading: true })
  return res
}
export async function appInfo(data) {
  const res = await get<Api.BasicInstance>(`/app/appConfig/info/${data.appKey}`, { notLoading: true })
  return res
}
export async function getDicInfo(param) {
  const res = await get<Api.BasicInstance>(`/app/menu/getDicInfo${param}`, { notLoading: true })
  return res
}
export async function getLatAndLngByAddress(param) {
  const res = await get<Api.BasicInstance>(`/app/appConfig/getLatAndLngByAddress${jsonToUrlParam(param)}`, { notLoading: true })
  return res
}
export async function getAddressByLatAndLng(param) {
  const res = await get<Api.BasicInstance>(`/app/appConfig/getAddressByLatAndLng${param}`, { notLoading: true })
  return res
}
export async function getTypeByFlag(param) {
  const res = await get<Api.BasicInstance>(`/app/appConfig/typeByFlag${jsonToUrlParam(param)}`, { notLoading: true })
  return res
}
